Bug 363 - Socket::SetDataSentCallback has bool return value
Socket::SetDataSentCallback has bool return value
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: network
pre-release
All All
: P3 normal
Assigned To: Craig Dowell
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-23 16:30 UTC by Mathieu Lacage
Modified: 2008-10-23 14:42 UTC (History)
1 user (show)

See Also:


Attachments
proposed patch (1.32 KB, patch)
2008-10-20 03:14 UTC, Mathieu Lacage
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Lacage 2008-09-23 16:30:21 UTC
that return value is useless. should be removed.
Comment 1 Tom Henderson 2008-09-25 09:12:48 UTC
What are you instead suggesting as the behavior?   Here is the current rationale:

   * \returns whether or not this socket supports this callback.  Note 
   *        that this is a non-standard socket call.  Some socket 
   *        implementations in ns-3 may not support this call, so the
   *        user should check this return value to confirm that the
   *        callback is supported. 

Or, are you saying that now that Nsc supports it, everyone will?
Comment 2 Mathieu Lacage 2008-09-25 11:24:47 UTC
1) this method is non-virtual and the only implementation of this method returns true unconditionally. Effectively, our implementation is making the return value meaningless.

2) I can't imagine how _anyone_ would be unable to support this callback so, supporting it unconditionally makes sense, so, removing the return value seems like the only logical choice.
Comment 3 Mathieu Lacage 2008-10-20 03:14:49 UTC
Created attachment 268 [details]
proposed patch