Bug 363

Summary: Socket::SetDataSentCallback has bool return value
Product: ns-3 Reporter: Mathieu Lacage <mathieu.lacage>
Component: networkAssignee: Craig Dowell <craigdo>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs
Priority: P3    
Version: pre-release   
Hardware: All   
OS: All   
Attachments: proposed patch

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