/[rdesktop]/sourceforge.net/trunk/rdesktop/rdesktop.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/rdesktop.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 376 by jsorg71, Mon May 19 21:36:33 2003 UTC revision 416 by forsberg, Fri Jun 6 11:11:20 2003 UTC
# Line 371  main(int argc, char *argv[]) Line 371  main(int argc, char *argv[])
371          if (!ui_init())          if (!ui_init())
372                  return 1;                  return 1;
373    
374            ipc_init();             // Must be run after ui_init, we need X to be setup.
375    
376            if (use_rdp5)
377                    cliprdr_init(); // FIXME: Should perhaps be integrated into the channel management code?
378    
379          if (!rdp_connect(server, flags, domain, password, shell, directory))          if (!rdp_connect(server, flags, domain, password, shell, directory))
380                  return 1;                  return 1;
381    
# Line 588  load_licence(unsigned char **data) Line 593  load_licence(unsigned char **data)
593          if (home == NULL)          if (home == NULL)
594                  return -1;                  return -1;
595    
596          path = (char*)xmalloc(strlen(home) + strlen(hostname) + sizeof("/.rdesktop/licence."));          path = (char *) xmalloc(strlen(home) + strlen(hostname) + sizeof("/.rdesktop/licence."));
597          sprintf(path, "%s/.rdesktop/licence.%s", home, hostname);          sprintf(path, "%s/.rdesktop/licence.%s", home, hostname);
598    
599          fd = open(path, O_RDONLY);          fd = open(path, O_RDONLY);
# Line 598  load_licence(unsigned char **data) Line 603  load_licence(unsigned char **data)
603          if (fstat(fd, &st))          if (fstat(fd, &st))
604                  return -1;                  return -1;
605    
606          *data = (uint8*)xmalloc(st.st_size);          *data = (uint8 *) xmalloc(st.st_size);
607          length = read(fd, *data, st.st_size);          length = read(fd, *data, st.st_size);
608          close(fd);          close(fd);
609          xfree(path);          xfree(path);
# Line 615  save_licence(unsigned char *data, int le Line 620  save_licence(unsigned char *data, int le
620          if (home == NULL)          if (home == NULL)
621                  return;                  return;
622    
623          path = (char*)xmalloc(strlen(home) + strlen(hostname) + sizeof("/.rdesktop/licence."));          path = (char *) xmalloc(strlen(home) + strlen(hostname) + sizeof("/.rdesktop/licence."));
624    
625          sprintf(path, "%s/.rdesktop", home);          sprintf(path, "%s/.rdesktop", home);
626          if ((mkdir(path, 0700) == -1) && errno != EEXIST)          if ((mkdir(path, 0700) == -1) && errno != EEXIST)
# Line 627  save_licence(unsigned char *data, int le Line 632  save_licence(unsigned char *data, int le
632          /* write licence to licence.hostname.new, then atomically rename to licence.hostname */          /* write licence to licence.hostname.new, then atomically rename to licence.hostname */
633    
634          sprintf(path, "%s/.rdesktop/licence.%s", home, hostname);          sprintf(path, "%s/.rdesktop/licence.%s", home, hostname);
635          tmppath = (char*)xmalloc(strlen(path) + sizeof(".new"));          tmppath = (char *) xmalloc(strlen(path) + sizeof(".new"));
636          strcpy(tmppath, path);          strcpy(tmppath, path);
637          strcat(tmppath, ".new");          strcat(tmppath, ".new");
638    
639          fd = open(tmppath, O_WRONLY|O_CREAT|O_TRUNC, 0600);          fd = open(tmppath, O_WRONLY | O_CREAT | O_TRUNC, 0600);
640          if (fd == -1)          if (fd == -1)
641          {          {
642                  perror(tmppath);                  perror(tmppath);

Legend:
Removed from v.376  
changed lines
  Added in v.416

  ViewVC Help
Powered by ViewVC 1.1.26