You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello all,
I tested the notification.c demo program where the notification port is set to 5468 but instead the program assigns a random port while running.
I made some changes to the OCI_SubscriptionRegister source code in the subscriptions.c file as follows:
**** LINE 181:
if (sub->port > 0)
{
#if 0 /* Port must be set on sub->env /
OCI_SET_ATTRIB(OCI_HTYPE_SUBSCRIPTION, OCI_ATTR_SUBSCR_PORTNO, sub->subhp, &sub->port, sizeof(sub->port))
#else
OCI_SET_ATTRIB(OCI_HTYPE_ENV, OCI_ATTR_SUBSCR_PORTNO, sub->env, &sub->port, sizeof(sub->port))
#endif
}
#if 0 / The 'else' branch is useless here, since no registration has been make yet */
else
{
OCI_GET_ATTRIB(OCI_HTYPE_SUBSCRIPTION, OCI_ATTR_SUBSCR_PORTNO, sub->subhp, &sub->port,NULL)
}
#endif
...
/* all attributes set, let's register the subscription ! */
OCI_EXEC(OCISubscriptionRegister(sub->con->cxt, &sub->subhp, (ub2) 1, sub->err,(ub4) OCI_DEFAULT))
**** LINE 252:
#if 1 /* Registration has been made, so we can retrieve the actual port returned by O.S. */
if (sub -> port == 0)
{
OCI_GET_ATTRIB(OCI_HTYPE_ENV, OCI_ATTR_SUBSCR_PORTNO, sub->env, &sub->port,NULL)
}
#endif
Regards,
Luciano
The text was updated successfully, but these errors were encountered:
Hello all,
I tested the notification.c demo program where the notification port is set to 5468 but instead the program assigns a random port while running.
I made some changes to the OCI_SubscriptionRegister source code in the subscriptions.c file as follows:
**** LINE 181:
#if 0 /* Port must be set on sub->env /
OCI_SET_ATTRIB(OCI_HTYPE_SUBSCRIPTION, OCI_ATTR_SUBSCR_PORTNO, sub->subhp, &sub->port, sizeof(sub->port))
#else
OCI_SET_ATTRIB(OCI_HTYPE_ENV, OCI_ATTR_SUBSCR_PORTNO, sub->env, &sub->port, sizeof(sub->port))
#endif
}
#if 0 / The 'else' branch is useless here, since no registration has been make yet */
else
{
OCI_GET_ATTRIB(OCI_HTYPE_SUBSCRIPTION, OCI_ATTR_SUBSCR_PORTNO, sub->subhp, &sub->port,NULL)
}
#endif
...
**** LINE 252:
#if 1 /* Registration has been made, so we can retrieve the actual port returned by O.S. */
if (sub -> port == 0)
{
OCI_GET_ATTRIB(OCI_HTYPE_ENV, OCI_ATTR_SUBSCR_PORTNO, sub->env, &sub->port,NULL)
}
#endif
Regards,
Luciano
The text was updated successfully, but these errors were encountered: