Correct error handling for TSPluginRegister

  typedef enum
  {
    TS_ERROR = -1,
    TS_SUCCESS = 0
  } TSReturnCode;

The original logic would log an error on TS_SUCCESS, and not log an error on TS_ERROR.