Mercurial > pidgin
comparison src/util.c @ 9427:66b3f54527e6
[gaim-migrate @ 10245]
" As discussed on #gaim
(15:02:02) Paco-Paco: the ugliness of this feature
trumps compatability, unless there is some pretty
important functionality to be lost
(15:04:02) aatharuv: Paco-Paco: Because zephyr is a
silly UDP based protocol, and sometimes subscriptions
(chats you've registered for) get lost, and you can
tell a user to a cli tool 'zctl' which will restore the
subs.
(15:04:32) aatharuv: Paco-Paco: Of course, I should
just add this as a protocol option, so users don't have
to do that.
(15:04:39) Paco-Paco: yes
(15:04:50) Paco-Paco: that would be the appropriate answer
(15:06:05) LSchiere: okay, so rather then messing with
anoncvs delays, i'm going to leave this in for now, and
aatharuv can just change to to a account option in place
Okay, here's a patch to reload subscriptions incase the
server loses track of them, as a protocol action. Since
my anoncvs hasn't even gotten the original zephyr patch
yet, you might as well reverse the original patch, and
apply this new one." --Arun A Tharuvai
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 29 Jun 2004 20:35:30 +0000 |
parents | dfee44a581a4 |
children | 8901ef16f310 |
comparison
equal
deleted
inserted
replaced
9426:dfee44a581a4 | 9427:66b3f54527e6 |
---|---|
1949 * Returns NULL on failure and cleans up after itself if so. | 1949 * Returns NULL on failure and cleans up after itself if so. |
1950 */ | 1950 */ |
1951 static const char *gaim_mkstemp_templ = {"gaimXXXXXX"}; | 1951 static const char *gaim_mkstemp_templ = {"gaimXXXXXX"}; |
1952 | 1952 |
1953 FILE * | 1953 FILE * |
1954 gaim_mkstemp(char **fpath) { | 1954 gaim_mkstemp(char **fpath) |
1955 return gaim_mkstemp_template(fpath, gaim_mkstemp_templ); | |
1956 } | |
1957 | |
1958 | |
1959 FILE * | |
1960 gaim_mkstemp_template(char **fpath, const char *template) | |
1961 { | 1955 { |
1962 const gchar *tmpdir; | 1956 const gchar *tmpdir; |
1963 #ifndef _WIN32 | 1957 #ifndef _WIN32 |
1964 int fd; | 1958 int fd; |
1965 #endif | 1959 #endif |
1966 FILE *fp = NULL; | 1960 FILE *fp = NULL; |
1967 | 1961 |
1968 g_return_val_if_fail(fpath != NULL, NULL); | 1962 g_return_val_if_fail(fpath != NULL, NULL); |
1969 | 1963 |
1970 if((tmpdir = (gchar*)g_get_tmp_dir()) != NULL) { | 1964 if((tmpdir = (gchar*)g_get_tmp_dir()) != NULL) { |
1971 if((*fpath = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", tmpdir, template)) != NULL) { | 1965 if((*fpath = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", tmpdir, gaim_mkstemp_templ)) != NULL) { |
1972 #ifdef _WIN32 | 1966 #ifdef _WIN32 |
1973 char* result = _mktemp( *fpath ); | 1967 char* result = _mktemp( *fpath ); |
1974 if( result == NULL ) | 1968 if( result == NULL ) |
1975 gaim_debug(GAIM_DEBUG_ERROR, "gaim_mkstemp", | 1969 gaim_debug(GAIM_DEBUG_ERROR, "gaim_mkstemp", |
1976 "Problem creating the template\n"); | 1970 "Problem creating the template\n"); |