]> Chaos Git - corbenik/ctrulib.git/commitdiff
Updated udsSetNewConnectionsBlocked() and UDSNETATTR for bitmask 0x4.
authoryellows8 <yellows8@users.noreply.github.com>
Wed, 13 Apr 2016 02:28:42 +0000 (22:28 -0400)
committeryellows8 <yellows8@users.noreply.github.com>
Wed, 13 Apr 2016 02:28:42 +0000 (22:28 -0400)
libctru/include/3ds/services/uds.h
libctru/source/services/uds.c

index e44517f8f78002b790f05c7e99e749a59ad469dc..fbb4c801d967b30509aa486db340fa11d0859a2c 100644 (file)
@@ -130,7 +130,7 @@ typedef struct {
 
 enum {
        UDSNETATTR_DisableConnectClients = BIT(1), //When set new Clients are (supposedly) not allowed to connect.
-       UDSNETATTR_DisableConnectSpectators = BIT(2), //When set new Spectators are (probably) not allowed to connect.
+       UDSNETATTR_x4 = BIT(2), //Unknown what this bit is for.
        UDSNETATTR_Default = BIT(15), //Unknown what this bit is for.
 };
 
@@ -320,12 +320,12 @@ Result udsEjectSpectator();
 Result udsUpdateNetworkAttribute(u16 bitmask, bool flag);
 
 /**
- * @brief This uses udsUpdateNetworkAttribute() for (un)blocking new connections to this host with the specified type(s). This is what it was supposed to do, doesn't seem actually to affect new connections though.
- * @param block When true, block the specified connection types. Otherwise allow them.
+ * @brief This uses udsUpdateNetworkAttribute() for (un)blocking new connections to this host.
+ * @param block When true, block the specified connection types(bitmask set). Otherwise allow them(bitmask clear).
  * @param clients When true, (un)block regular clients.
- * @param clients When true, (un)block spectators(?).
+ * @param flag When true, update UDSNETATTR_x4. Normally this should be false.
  */
-Result udsSetNewConnectionsBlocked(bool block, bool clients, bool spectators);
+Result udsSetNewConnectionsBlocked(bool block, bool clients, bool flag);
 
 /**
  * @brief This loads the current ConnectionStatus struct.
index c57e1524666a2db180fa84f41b9599cb7c5bc6f6..d1459aa377b035089c6892db5ac0d3a75eaa0fa8 100644 (file)
@@ -354,12 +354,12 @@ Result udsUpdateNetworkAttribute(u16 bitmask, bool flag)
        return cmdbuf[1];
 }
 
-Result udsSetNewConnectionsBlocked(bool block, bool clients, bool spectators)
+Result udsSetNewConnectionsBlocked(bool block, bool clients, bool flag)
 {
        u16 bitmask = 0;
 
        if(clients)bitmask |= UDSNETATTR_DisableConnectClients;
-       if(spectators)bitmask |= UDSNETATTR_DisableConnectSpectators;
+       if(flag)bitmask |= UDSNETATTR_x4;
 
        return udsUpdateNetworkAttribute(bitmask, block);
 }