libpurple/protocols/zephyr/ZAsyncLocate.c

changeset 40643
1c9bdf8d3e85
parent 40474
1341be8e3402
--- a/libpurple/protocols/zephyr/ZAsyncLocate.c	Fri Dec 11 01:48:49 2020 -0600
+++ b/libpurple/protocols/zephyr/ZAsyncLocate.c	Fri Dec 11 04:12:45 2020 -0600
@@ -21,9 +21,12 @@
     ZNotice_t notice;
     size_t userlen, versionlen;
 
-    if (ZGetFD() < 0)
-	if ((retval = ZOpenPort((unsigned short *)0)) != ZERR_NONE)
-	    return (retval);
+	if (ZGetSocket() == NULL) {
+		retval = ZOpenPort(NULL);
+		if (retval != ZERR_NONE) {
+			return retval;
+		}
+	}
 
     (void) memset((char *)&notice, 0, sizeof(notice));
     notice.z_kind = kind;

mercurial