s3:smbd:smb2: fix an assignment-instead-of-check bug conn_snum_used()
[samba.git] / source3 / smbd / conn.c
index 833147b1a645d76d584259b62278b77f8a4d94a1..8a96e880538efb67e1d02c3c049e2fdbf5e38198 100644 (file)
@@ -67,7 +67,7 @@ bool conn_snum_used(int snum)
                        for (ptcon = sess->tcons.list; ptcon; ptcon = ptcon->next) {
                                if (ptcon->compat_conn &&
                                                ptcon->compat_conn->params &&
                        for (ptcon = sess->tcons.list; ptcon; ptcon = ptcon->next) {
                                if (ptcon->compat_conn &&
                                                ptcon->compat_conn->params &&
-                                               (ptcon->compat_conn->params->service = snum)) {
+                                               (ptcon->compat_conn->params->service == snum)) {
                                        return true;
                                }
                        }
                                        return true;
                                }
                        }