FILE *localFile;
struct stat fileInfo;
- const char *fileName = [[self getUploadSafeName:[dragRegion filePath]] UTF8String];
+ NSString *uploadName = [self getUploadSafeName:[dragRegion filePath]];
+ const char *fileName = [uploadName UTF8String];
[self setStatus:@"Connecting to acs.bu.edu" isError:NO];
struct sockaddr_in sin;
NSString *printer = [[printersController selection] valueForKey:@"unixName"];
cmd = (char *)[[NSString stringWithFormat:@"lpr -m -#%d -P%@ %s\r\n\0", [[copiesButtons selectedCell] tag], printer, fileName] UTF8String];
#else
- NSLog(@"tag = %@ [%d]", [copiesButtons selectedCell], [[copiesButtons selectedCell] tag]);
if ([[copiesButtons selectedCell] tag] == 1)
cmd = "touch __PRINT_1__\r\n\0";
else
libssh2_channel_write(channel, cmd, sizeof(char) * strlen(cmd));
[self readChannel:channel];
- [self setStatus:@"Printed!" isError:NO];
+ [self setStatus:[NSString stringWithFormat:@"Printed %@", uploadName] isError:NO];
+
+ [dragRegion clearFile];
libssh2_channel_send_eof(channel);
libssh2_channel_eof(channel);
close(sock);
- [dragRegion clearFile];
[progress stopAnimation:self];
[pool release];