conncheck: Use the right test for empty remote_frag
authorOlivier Crête <olivier.crete@collabora.com>
Tue, 4 Apr 2017 16:25:50 +0000 (12:25 -0400)
committerOlivier Crête <olivier.crete@collabora.com>
Tue, 4 Apr 2017 16:26:30 +0000 (12:26 -0400)
It's now an array, not a pointer, so needs to test to emptyness.

It's a bugfix on the previous commit, 59ce41df

agent/conncheck.c

index 2abbc5e..7096b42 100644 (file)
@@ -3638,7 +3638,7 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, NiceStream *stream,
             agent, stream, component, priority, from, nicesock,
             local_candidate,
             remote_candidate2 ? remote_candidate2 : remote_candidate);
-        if(remote_candidate && stream->remote_ufrag != NULL) {
+        if(remote_candidate && stream->remote_ufrag[0]) {
           if (local_candidate &&
               local_candidate->transport == NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE) {
             CandidateCheckPair *pair;
@@ -3657,7 +3657,7 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, NiceStream *stream,
       priv_reply_to_conn_check (agent, stream, component, local_candidate,
           remote_candidate, from, nicesock, rbuf_len, &msg, use_candidate);
 
-      if (stream->remote_ufrag == NULL) {
+      if (stream->remote_ufrag[0] == 0) {
         /* case: We've got a valid binding request to a local candidate
          *       but we do not yet know remote credentials.
          *       As per sect 7.2 of ICE (ID-19), we send a reply