#define E_NO_DATA (int)TIZEN_ERROR_NO_DATA /* No data available */
#define E_UNKNOWN (int)TIZEN_ERROR_UNKNOWN /* Unknown error */
-#define E_STARTED (int)(TIZEN_ERROR_CONTEXT | 0x01) /* Feature already activated */
+#define E_STARTED (int)(TIZEN_ERROR_CONTEXT | 0x01) /* Feature already activated */
#define E_NOT_STARTED (int)(TIZEN_ERROR_CONTEXT | 0x02) /* Feature already deactivated */
-#define E_RANGE (int)(TIZEN_ERROR_CONTEXT | 0x03) /* Index out of range */
-#define E_FAILED (int)(TIZEN_ERROR_CONTEXT | 0x04) /* Operation failed with some internal errors */
-#define E_RULE_ON (int)(TIZEN_ERROR_CONTEXT | 0x05) /* Rule enabled */
-#define E_RULE_OFF (int)(TIZEN_ERROR_CONTEXT | 0x06) /* Rule not enabled */
-#define E_INV_RULE (int)(TIZEN_ERROR_CONTEXT | 0x07) /* Invalid rule */
-#define E_NO_RULE (int)(TIZEN_ERROR_CONTEXT | 0x08) /* Rule not exists */
+#define E_RANGE (int)(TIZEN_ERROR_CONTEXT | 0x03) /* Index out of range */
+#define E_FAILED (int)(TIZEN_ERROR_CONTEXT | 0x04) /* Operation failed with some internal errors */
+#define E_RULE_ON (int)(TIZEN_ERROR_CONTEXT | 0x05) /* Rule enabled */
+#define E_RULE_OFF (int)(TIZEN_ERROR_CONTEXT | 0x06) /* Rule not enabled */
+#define E_INV_RULE (int)(TIZEN_ERROR_CONTEXT | 0x07) /* Invalid rule */
+#define E_NO_RULE (int)(TIZEN_ERROR_CONTEXT | 0x08) /* Rule not exists */
#define E_DATA_EXIST (int)(TIZEN_ERROR_CONTEXT | 0X09) /* Data exists */
-#define E_INV_DATA (int)(TIZEN_ERROR_CONTEXT | 0X0A) /* Invalid data */
+#define E_INV_DATA (int)(TIZEN_ERROR_CONTEXT | 0X0A) /* Invalid data */
/* Logging and Error Handling */
#define _I SLOGI
IF_FAIL_RETURN_TAG(strlen(path) < sizeof(addr.sun_path), false, _E, "Invalid path");
sock = socket(AF_UNIX, SOCK_STREAM, 0);
- IF_FAIL_RETURN_TAG(sock > 0, false, _E, "socket creation failed");
+ IF_FAIL_RETURN_TAG(sock >= 0, false, _E, "socket creation failed");
bzero(&addr, sizeof(addr));
addr.sun_family = AF_UNIX;