summaryrefslogtreecommitdiff
path: root/src/sm_client.c
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2007-05-13 01:43:49 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2007-05-13 01:43:49 +0200
commit48d23e452780f327439a859fa941b1598eb249c8 (patch)
treecfac7a919906808166b5605135d284e38a14a0a9 /src/sm_client.c
parent57ea148fdbf047a012b361acdc7954e70679dad3 (diff)
Removed some global writable variables.
Diffstat (limited to 'src/sm_client.c')
-rw-r--r--src/sm_client.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/sm_client.c b/src/sm_client.c
index 047924b..03ffc0e 100644
--- a/src/sm_client.c
+++ b/src/sm_client.c
@@ -38,6 +38,8 @@ in this Software without prior written authorization from The Open Group.
#include "SMlibint.h"
#include "globals.h"
+extern IcePoAuthStatus _IcePoMagicCookie1Proc ();
+extern void _SmcProcessMessage ();
static void set_callbacks();
@@ -73,6 +75,16 @@ char *errorStringRet;
_SmcRegisterClientReply reply;
Bool gotReply, ioErrorOccured;
+ const char *auth_names[] = {"MIT-MAGIC-COOKIE-1"};
+ IcePoAuthProc auth_procs[] = {_IcePoMagicCookie1Proc};
+ int auth_count = 1;
+
+ IcePoVersionRec versions[] = {
+ {SmProtoMajor, SmProtoMinor, _SmcProcessMessage}
+ };
+ int version_count = 1;
+
+
*clientIdRet = NULL;
if (errorStringRet && errorLength > 0)
@@ -83,13 +95,13 @@ char *errorStringRet;
/*
* For now, there is only one version of XSMP, so we don't
* have to check {xsmpMajorRev, xsmpMinorRev}. In the future,
- * we will check against _SmcVersions and generate the list
+ * we will check against versions and generate the list
* of versions the application actually supports.
*/
if ((_SmcOpcode = IceRegisterForProtocolSetup ("XSMP",
- SmVendorString, SmReleaseString, _SmVersionCount, _SmcVersions,
- _SmAuthCount, _SmAuthNames, _SmcAuthProcs, NULL)) < 0)
+ SmVendorString, SmReleaseString, version_count, versions,
+ auth_count, auth_names, auth_procs, NULL)) < 0)
{
if (errorStringRet && errorLength > 0) {
strncpy (errorStringRet,